package com.navi.loaddata.core.oracleEntity.array;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by ghost on 2018/6/19.
 */
@Entity
@Table(name = "ETL_ARRAY_TTP_RESULT_V", schema = "EDALDR", catalog = "")
@IdClass(EtlArrayTtpResultVPK.class)
public class EtlArrayTtpResultV {
    private String stepId;
    private String glassId;
    private Date glassEndTime;
    private String paramCollection;
    private String paramName;
    private String siteName;
    private Long paramValue;
    private Long x;
    private Long y;
    private Long definitionX;
    private Long definitionY;
//    private String shotId;
//    private Long seqInShot;
    private Long shiftX;
    private Long shiftY;
//    private Long specHigh;
//    private Long specLow;
//    private Long specTarget;
//    private Long controlHigh;
//    private Long controlLow;

    @Id
    @Column(name = "STEP_ID")
    public String getStepId() {
        return stepId;
    }

    public void setStepId(String stepId) {
        this.stepId = stepId;
    }

    @Id
    @Column(name = "GLASS_ID")
    public String getGlassId() {
        return glassId;
    }

    public void setGlassId(String glassId) {
        this.glassId = glassId;
    }

    @Id
    @Column(name = "GLASS_END_TIME")
    @Temporal(TemporalType.TIMESTAMP)
    public Date getGlassEndTime() {
        return glassEndTime;
    }

    public void setGlassEndTime(Date glassEndTime) {
        this.glassEndTime = glassEndTime;
    }

    @Id
    @Column(name = "PARAM_COLLECTION")
    public String getParamCollection() {
        return paramCollection;
    }

    public void setParamCollection(String paramCollection) {
        this.paramCollection = paramCollection;
    }

    @Id
    @Column(name = "PARAM_NAME")
    public String getParamName() {
        return paramName;
    }

    public void setParamName(String paramName) {
        this.paramName = paramName;
    }

    @Id
    @Column(name = "SITE_NAME")
    public String getSiteName() {
        return siteName;
    }

    public void setSiteName(String siteName) {
        this.siteName = siteName;
    }

    @Basic
    @Column(name = "PARAM_VALUE")
    public Long getParamValue() {
        return paramValue;
    }

    public void setParamValue(Long paramValue) {
        this.paramValue = paramValue;
    }

    @Basic
    @Column(name = "X")
    public Long getX() {
        return x;
    }

    public void setX(Long x) {
        this.x = x;
    }

    @Basic
    @Column(name = "Y")
    public Long getY() {
        return y;
    }

    public void setY(Long y) {
        this.y = y;
    }

    @Basic
    @Column(name = "DEFINITION_X")
    public Long getDefinitionX() {
        return definitionX;
    }

    public void setDefinitionX(Long definitionX) {
        this.definitionX = definitionX;
    }

    @Basic
    @Column(name = "DEFINITION_Y")
    public Long getDefinitionY() {
        return definitionY;
    }

    public void setDefinitionY(Long definitionY) {
        this.definitionY = definitionY;
    }

//    @Basic
//    @Column(name = "SHOT_ID")
//    public String getShotId() {
//        return shotId;
//    }
//
//    public void setShotId(String shotId) {
//        this.shotId = shotId;
//    }
//
//    @Basic
//    @Column(name = "SEQ_IN_SHOT")
//    public Long getSeqInShot() {
//        return seqInShot;
//    }
//
//    public void setSeqInShot(Long seqInShot) {
//        this.seqInShot = seqInShot;
//    }

    @Basic
    @Column(name = "SHIFT_X")
    public Long getShiftX() {
        return shiftX;
    }

    public void setShiftX(Long shiftX) {
        this.shiftX = shiftX;
    }

    @Basic
    @Column(name = "SHIFT_Y")
    public Long getShiftY() {
        return shiftY;
    }

    public void setShiftY(Long shiftY) {
        this.shiftY = shiftY;
    }

//    @Basic
//    @Column(name = "SPEC_HIGH")
//    public Long getSpecHigh() {
//        return specHigh;
//    }
//
//    public void setSpecHigh(Long specHigh) {
//        this.specHigh = specHigh;
//    }
//
//    @Basic
//    @Column(name = "SPEC_LOW")
//    public Long getSpecLow() {
//        return specLow;
//    }
//
//    public void setSpecLow(Long specLow) {
//        this.specLow = specLow;
//    }
//
//    @Basic
//    @Column(name = "SPEC_TARGET")
//    public Long getSpecTarget() {
//        return specTarget;
//    }
//
//    public void setSpecTarget(Long specTarget) {
//        this.specTarget = specTarget;
//    }
//
//    @Basic
//    @Column(name = "CONTROL_HIGH")
//    public Long getControlHigh() {
//        return controlHigh;
//    }
//
//    public void setControlHigh(Long controlHigh) {
//        this.controlHigh = controlHigh;
//    }
//
//    @Basic
//    @Column(name = "CONTROL_LOW")
//    public Long getControlLow() {
//        return controlLow;
//    }
//
//    public void setControlLow(Long controlLow) {
//        this.controlLow = controlLow;
//    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        EtlArrayTtpResultV that = (EtlArrayTtpResultV) o;

        if (stepId != null ? !stepId.equals(that.stepId) : that.stepId != null) return false;
        if (glassId != null ? !glassId.equals(that.glassId) : that.glassId != null) return false;
        if (glassEndTime != null ? !glassEndTime.equals(that.glassEndTime) : that.glassEndTime != null) return false;
        if (paramCollection != null ? !paramCollection.equals(that.paramCollection) : that.paramCollection != null)
            return false;
        if (paramName != null ? !paramName.equals(that.paramName) : that.paramName != null) return false;
        if (siteName != null ? !siteName.equals(that.siteName) : that.siteName != null) return false;
        if (paramValue != null ? !paramValue.equals(that.paramValue) : that.paramValue != null) return false;
        if (x != null ? !x.equals(that.x) : that.x != null) return false;
        if (y != null ? !y.equals(that.y) : that.y != null) return false;
        if (definitionX != null ? !definitionX.equals(that.definitionX) : that.definitionX != null) return false;
        if (definitionY != null ? !definitionY.equals(that.definitionY) : that.definitionY != null) return false;
//        if (shotId != null ? !shotId.equals(that.shotId) : that.shotId != null) return false;
//        if (seqInShot != null ? !seqInShot.equals(that.seqInShot) : that.seqInShot != null) return false;
        if (shiftX != null ? !shiftX.equals(that.shiftX) : that.shiftX != null) return false;
        if (shiftY != null ? !shiftY.equals(that.shiftY) : that.shiftY != null) return false;
//        if (specHigh != null ? !specHigh.equals(that.specHigh) : that.specHigh != null) return false;
//        if (specLow != null ? !specLow.equals(that.specLow) : that.specLow != null) return false;
//        if (specTarget != null ? !specTarget.equals(that.specTarget) : that.specTarget != null) return false;
//        if (controlHigh != null ? !controlHigh.equals(that.controlHigh) : that.controlHigh != null) return false;
//        if (controlLow != null ? !controlLow.equals(that.controlLow) : that.controlLow != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = stepId != null ? stepId.hashCode() : 0;
        result = 31 * result + (glassId != null ? glassId.hashCode() : 0);
        result = 31 * result + (glassEndTime != null ? glassEndTime.hashCode() : 0);
        result = 31 * result + (paramCollection != null ? paramCollection.hashCode() : 0);
        result = 31 * result + (paramName != null ? paramName.hashCode() : 0);
        result = 31 * result + (siteName != null ? siteName.hashCode() : 0);
        result = 31 * result + (paramValue != null ? paramValue.hashCode() : 0);
        result = 31 * result + (x != null ? x.hashCode() : 0);
        result = 31 * result + (y != null ? y.hashCode() : 0);
        result = 31 * result + (definitionX != null ? definitionX.hashCode() : 0);
        result = 31 * result + (definitionY != null ? definitionY.hashCode() : 0);
//        result = 31 * result + (shotId != null ? shotId.hashCode() : 0);
//        result = 31 * result + (seqInShot != null ? seqInShot.hashCode() : 0);
        result = 31 * result + (shiftX != null ? shiftX.hashCode() : 0);
        result = 31 * result + (shiftY != null ? shiftY.hashCode() : 0);
//        result = 31 * result + (specHigh != null ? specHigh.hashCode() : 0);
//        result = 31 * result + (specLow != null ? specLow.hashCode() : 0);
//        result = 31 * result + (specTarget != null ? specTarget.hashCode() : 0);
//        result = 31 * result + (controlHigh != null ? controlHigh.hashCode() : 0);
//        result = 31 * result + (controlLow != null ? controlLow.hashCode() : 0);
        return result;
    }
}
